package com.zookeeper.ref.balance;

import java.util.List;

/**
 * Author: dong peng
 * Date: 2018/1/23
 * Time: 15:27
 */


public abstract class AbstractBalanceProvider<T> implements BalanceProvider<T> {

    protected abstract T balanceAlgorithm(List<T> items);
    protected abstract List<T> getBalanceItems();

    public T getBalanceItem(){
        return balanceAlgorithm(getBalanceItems());
    }

}